Optimal. Leaf size=96 \[ \frac {a^2 \tan (c+d x)}{d}+\frac {2 a (a+b) \tan ^3(c+d x)}{3 d}+\frac {\left (a^2+4 a b+b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {2 b (a+b) \tan ^7(c+d x)}{7 d}+\frac {b^2 \tan ^9(c+d x)}{9 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {3756, 380}
\begin {gather*} \frac {\left (a^2+4 a b+b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {a^2 \tan (c+d x)}{d}+\frac {2 b (a+b) \tan ^7(c+d x)}{7 d}+\frac {2 a (a+b) \tan ^3(c+d x)}{3 d}+\frac {b^2 \tan ^9(c+d x)}{9 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 380
Rule 3756
Rubi steps
\begin {align*} \int \sec ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx &=\frac {\text {Subst}\left (\int \left (1+x^2\right )^2 \left (a+b x^2\right )^2 \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (a^2+2 a (a+b) x^2+\left (a^2+4 a b+b^2\right ) x^4+2 b (a+b) x^6+b^2 x^8\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {a^2 \tan (c+d x)}{d}+\frac {2 a (a+b) \tan ^3(c+d x)}{3 d}+\frac {\left (a^2+4 a b+b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {2 b (a+b) \tan ^7(c+d x)}{7 d}+\frac {b^2 \tan ^9(c+d x)}{9 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.26, size = 106, normalized size = 1.10 \begin {gather*} \frac {\left (8 \left (21 a^2-6 a b+b^2\right )+4 \left (21 a^2-6 a b+b^2\right ) \sec ^2(c+d x)+3 \left (21 a^2-6 a b+b^2\right ) \sec ^4(c+d x)+10 (9 a-5 b) b \sec ^6(c+d x)+35 b^2 \sec ^8(c+d x)\right ) \tan (c+d x)}{315 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.27, size = 157, normalized size = 1.64
method | result | size |
derivativedivides | \(\frac {b^{2} \left (\frac {\sin ^{5}\left (d x +c \right )}{9 \cos \left (d x +c \right )^{9}}+\frac {4 \left (\sin ^{5}\left (d x +c \right )\right )}{63 \cos \left (d x +c \right )^{7}}+\frac {8 \left (\sin ^{5}\left (d x +c \right )\right )}{315 \cos \left (d x +c \right )^{5}}\right )+2 a b \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )-a^{2} \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )}{d}\) | \(157\) |
default | \(\frac {b^{2} \left (\frac {\sin ^{5}\left (d x +c \right )}{9 \cos \left (d x +c \right )^{9}}+\frac {4 \left (\sin ^{5}\left (d x +c \right )\right )}{63 \cos \left (d x +c \right )^{7}}+\frac {8 \left (\sin ^{5}\left (d x +c \right )\right )}{315 \cos \left (d x +c \right )^{5}}\right )+2 a b \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )-a^{2} \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )}{d}\) | \(157\) |
risch | \(\frac {16 i \left (210 a^{2} {\mathrm e}^{12 i \left (d x +c \right )}-420 a b \,{\mathrm e}^{12 i \left (d x +c \right )}+210 b^{2} {\mathrm e}^{12 i \left (d x +c \right )}+945 a^{2} {\mathrm e}^{10 i \left (d x +c \right )}-630 a b \,{\mathrm e}^{10 i \left (d x +c \right )}-315 b^{2} {\mathrm e}^{10 i \left (d x +c \right )}+1701 a^{2} {\mathrm e}^{8 i \left (d x +c \right )}-126 a b \,{\mathrm e}^{8 i \left (d x +c \right )}+441 b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+1554 a^{2} {\mathrm e}^{6 i \left (d x +c \right )}-84 a b \,{\mathrm e}^{6 i \left (d x +c \right )}-126 b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+756 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-216 a b \,{\mathrm e}^{4 i \left (d x +c \right )}+36 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+189 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}-54 a b \,{\mathrm e}^{2 i \left (d x +c \right )}+9 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+21 a^{2}-6 a b +b^{2}\right )}{315 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{9}}\) | \(279\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 85, normalized size = 0.89 \begin {gather*} \frac {35 \, b^{2} \tan \left (d x + c\right )^{9} + 90 \, {\left (a b + b^{2}\right )} \tan \left (d x + c\right )^{7} + 63 \, {\left (a^{2} + 4 \, a b + b^{2}\right )} \tan \left (d x + c\right )^{5} + 210 \, {\left (a^{2} + a b\right )} \tan \left (d x + c\right )^{3} + 315 \, a^{2} \tan \left (d x + c\right )}{315 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.53, size = 114, normalized size = 1.19 \begin {gather*} \frac {{\left (8 \, {\left (21 \, a^{2} - 6 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{8} + 4 \, {\left (21 \, a^{2} - 6 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{6} + 3 \, {\left (21 \, a^{2} - 6 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} + 10 \, {\left (9 \, a b - 5 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 35 \, b^{2}\right )} \sin \left (d x + c\right )}{315 \, d \cos \left (d x + c\right )^{9}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan ^{2}{\left (c + d x \right )}\right )^{2} \sec ^{6}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.83, size = 118, normalized size = 1.23 \begin {gather*} \frac {35 \, b^{2} \tan \left (d x + c\right )^{9} + 90 \, a b \tan \left (d x + c\right )^{7} + 90 \, b^{2} \tan \left (d x + c\right )^{7} + 63 \, a^{2} \tan \left (d x + c\right )^{5} + 252 \, a b \tan \left (d x + c\right )^{5} + 63 \, b^{2} \tan \left (d x + c\right )^{5} + 210 \, a^{2} \tan \left (d x + c\right )^{3} + 210 \, a b \tan \left (d x + c\right )^{3} + 315 \, a^{2} \tan \left (d x + c\right )}{315 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 12.22, size = 80, normalized size = 0.83 \begin {gather*} \frac {a^2\,\mathrm {tan}\left (c+d\,x\right )+\frac {b^2\,{\mathrm {tan}\left (c+d\,x\right )}^9}{9}+{\mathrm {tan}\left (c+d\,x\right )}^5\,\left (\frac {a^2}{5}+\frac {4\,a\,b}{5}+\frac {b^2}{5}\right )+\frac {2\,a\,{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (a+b\right )}{3}+\frac {2\,b\,{\mathrm {tan}\left (c+d\,x\right )}^7\,\left (a+b\right )}{7}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________